﻿using Application.AppService.SSAppServoice;
using AutoMapper;
using Domain.Entity;
using Microsoft.AspNetCore.Mvc;

namespace UI.Controllers.Pay_Scale_Management_薪酬标准管理_
{
    public class AlterationController : Controller
    {
        private readonly ISSAppService ssAppServoice;
        private readonly IMapper mapper;

        public AlterationController(ISSAppService ssAppServoice, IMapper mapper)
        {
            this.ssAppServoice = ssAppServoice;
            this.mapper = mapper;
        }
        /// <summary>
        /// 变更
        /// </summary>
        /// <returns></returns>
        public IActionResult Index()
        {
            return View();
        }
        public IActionResult Index1()
        {
            return View();
        }
        public IActionResult Index2()
        {
            return View();
        }
        [HttpPost("UpdateSSDesigne")]
        public async Task<IActionResult> UpdateSSDesigne(SSAlterationDto sSAlterationDto)
        {
            SS ss = mapper.Map<SS>(sSAlterationDto);
            bool rs = await ssAppServoice.UpdateSSDesignerAsync(ss);
            return Json(rs);
        }
    }
}
